package com.wunong.smart.collection.client.enums;

import com.wunong.smart.domain.platform.common.ICode;
import com.wunong.smart.domain.platform.utils.ICodes;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author create by zealot.zt on 2018-09-30
 */
@Getter
@AllArgsConstructor
public enum CollectionStatusEnum implements ICode {

    INIT(1, "初始化"),
    COLLECTING(2, "收藏中"),
    CANCELED(3, "已取消收藏"),
    ;

    private final int code;
    private final String name;

    public static CollectionStatusEnum of(Integer code) {
        return ICodes.findFirst(CollectionStatusEnum.values(), code);
    }

}
